module.exports = (app) => {
  const { STRING, JSON } = app.Sequelize;

  const AwardList = app.model.define(
    "award-list", // 更改为更合适的表名
    {
      avatar: {
        type: STRING(255),
        allowNull: false,
      },
      name: {
        type: STRING(255),
        allowNull: false,
      },
      title: {
        type: STRING(255),
        allowNull: true,
      },
      kindIds: {
        type: JSON,
        allowNull: false,
      },
      jumpLink: { 
        type: STRING(255),
        allowNull: true,
      },
    },
    {
      timestamps: true, // Sequelize 会自动添加 createdAt 和 updatedAt 字段
      underscored: false, // 使用驼峰式命名法
    }
  );

  return AwardList;
};
